package com.oig.sys.base.app.impl;

import com.oig.sys.base.app.IAppPortService;
import com.oig.sys.base.dto.PortDto;
import com.oig.sys.base.service.ITbPortService;
import com.oig.sys.base.vo.PortVo;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class AppPortServiceImpl implements IAppPortService {

    private final ITbPortService portService;

    @GlobalTransactional
    @Override
    public PortVo addPort(PortDto portDto) {
        return this.portService.addPort(portDto);
    }

    @GlobalTransactional
    @Override
    public PortVo updatePort(PortDto portDto) {
        return this.portService.updatePort(portDto);
    }

    @GlobalTransactional
    @Override
    public void cancelPort(String code) {
        this.portService.cancelPort(code);
    }



}
